package geography;

public class Location {
	private final int x;
	private final int y;
	
	public Location(int xCoord,  int yCoord){
		x = xCoord;
		y = yCoord;
	}
	
	/**
	 * Returns the x-coordinate of the {@link Location}.
	 * @return {@link Integer} x-coordinate
	 */
	public int getX(){
		return x;
	}
	/**
	 * Returns the y-coordinate of the {@link Location}.
	 * @return {@link Integer} y-coordinate
	 */
	public int getY(){
		return y;
	}
	
	public String toString(){
		return "["+x+","+y+"]";
	}
	
	public boolean equals(Location otherLocation){
		if(otherLocation.getX() == x && otherLocation.getY() == y){
			return true;
		}
		return false;
	}
}
